#include <stdio.h>

int main(){
	int n,sum=0;
	scanf("%d",&n);
	
//int tmp = (~n)+1;
	
	//printf("%d",__builtin_popcount(tmp));
	if((n&1)==1)
	{
		sum++;
	}
	n>>=1;
	printf("%d",sum);
	return 0;
}